﻿package com.ease.model.type
{
	import com.ease.common.enums.NamedEnum;
	import com.ease.lang.Enum;
	import com.ease.lang.EnumConstants;
	import com.ease.model.type.DatabaseNullable;

	[Bindable]
	[RemoteClass(alias="com.ease.model.type.DatabaseNullable")]

	public class DatabaseNullable extends Enum
	{
		/* static init */
		{ initEnum(DatabaseNullable); }

		/* Constants */
		public static const N:DatabaseNullable = new DatabaseNullable("N", false);
		public static const Y:DatabaseNullable = new DatabaseNullable("Y", true);

		private var _notNull:Boolean;

		/*public*/ function DatabaseNullable(name:String=null ,notNull:Boolean=false) {
			super.name = name;
			this._notNull = notNull;
		}

		public function get notNull():Boolean  { return this._notNull; }

		/* constant query */
		public static function getEnumConstants():Array {
			return Enum.getEnumConstants(DatabaseNullable);
		}

		public static function get(constantName:String, caseSensitive:Boolean = false):DatabaseNullable {
			return DatabaseNullable(Enum.get(DatabaseNullable, constantName, caseSensitive));
		}
	}
}